-- GENERATED SPELL FOR [Sunhawk Agent] --


function spell0_17610(pUnit, Event) --@Backstab,n/a--
pUnit:FullCastSpellOnTarget(7159,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17610', 561, 1)
end

function spell1_17610(pUnit, Event) --@Eviscerate,n/a--
pUnit:FullCastSpellOnTarget(15691,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17610', 578, 1)
end

function spell2_17610(pUnit, Event) --@Mark of the Sunhawk,n/a--
pUnit:FullCastSpellOnTarget(31734,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17610', 20344, 1)
end

function spell3_17610(pUnit, Event) --@Sinister Strike,n/a--
pUnit:FullCastSpellOnTarget(14873,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17610', 616, 1)
end

function Sorts_17610(pUnit, Event)
local choix_sorts_17610 = math.random(0, 3)
if choix_sorts_17610 == 0 then
pUnit:RegisterEvent('spell0_17610', 1, 1)
end
if choix_sorts_17610 == 1 then
pUnit:RegisterEvent('spell1_17610', 1, 1)
end
if choix_sorts_17610 == 2 then
pUnit:RegisterEvent('spell2_17610', 1, 1)
end
if choix_sorts_17610 == 3 then
pUnit:RegisterEvent('spell3_17610', 1, 1)
end
end

function mob17610_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17610', math.random(1500, 3000), 1)
end

function mob17610_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17610_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17610_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17610, 1, 'mob17610_Action')
RegisterUnitEvent(17610, 2, 'mob17610_Leave')
RegisterUnitEvent(17610, 3, 'mob17610_Kill')
RegisterUnitEvent(17610, 4, 'mob17610_Die')
